﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="hotelList.aspx.vb" Inherits="travel.hotelList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp;</p>
    <p>

    <p>
        <asp:PlaceHolder ID="ph_SuperUsers" runat="server">
        
            Visible to super users
        
        </asp:PlaceHolder>
    <p>


        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="tagsDataSource">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="Tag" 
                    DataNavigateUrlFormatString="HotelsByTag.aspx?tag={0}" DataTextField="Tag" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="tagsDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:travelConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:travelConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Tag] FROM [Tags]"></asp:SqlDataSource>
    </p>
    <p><br /></p>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSource1" Width="899px">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="HotelUrl" 
                DataNavigateUrlFormatString="{0}" DataTextField="HotelName" 
                HeaderText="Hotel Name" />
            <asp:HyperLinkField DataNavigateUrlFields="Location" 
                DataNavigateUrlFormatString="http://maps.google.co.uk/maps?q={0}" 
                DataTextField="Location" HeaderText="Location" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:ImageField DataImageUrlField="Pictures" HeaderText="Picture">
                <ControlStyle CssClass="hotelImage" />
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="hotelDetail.aspx?ID={0}" HeaderText="More Detail" 
                Text="Detail" />
            <asp:TemplateField HeaderText="Stars">
                <ItemTemplate> <h1><%# getStars(Eval(“Stars”)) %></h1> </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:travelConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:travelConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [HotelName], [Stars], [Location], [Description], [HotelUrl], [Pictures] FROM [hotels]">
    </asp:SqlDataSource>
</p>
    <p>
</p>
</asp:Content>
